1. Field of the Invention
The present invention relates in general computer networks and in particular to a dynamically configurable buffer for a computer network.
2. Description of Related Art
When computers communicate through an Ethernet or similar network they send packets of data to one other. Packets travel buses, and the various buses forming an Ethernet network can have varying data transfer rates. A network buffer is a device that receives and stores packets arriving on one bus and then forwards them outward on another bus. A buffer can be used in an Ethernet network, for example, to link a high-speed bus to a low-speed bus because the buffer can receive and store packets arriving at a high rate on the high-speed bus and then forward them on the low speed bus at a slower rate. A network buffer can also be used as an input stage to a packet routing device to store packets until the routing device is ready to forward them to its network destination.
A typical network buffer includes a random access buffer memory for storing packets and a buffer manager for writing packets arriving on an input bus into the buffer memory and for reading packets out of the memory and forwarding them on an output bus. In an Ethernet or similar network, data packets may range in size between specified minimum and maximum sizes. Thus a buffer manager must be able to keep track of the size of each packet stored in the buffer memory, where each packet is stored, and the order in which stored packets arrived. Prior art buffer managers have used various methods for organizing a buffer memory and for keeping track of the packets it stores. Simple buffer managers carry out relatively few record keeping steps but typically do not use buffer memory efficiently. Some buffer managers use buffer memory efficiently but at the cost of carrying out more complicated record keeping operations. Since buffer memory cost increases with its size, it is desirable to make efficient use of buffer memory. On the other hand, since complicated record keeping procedures increase the complexity of the buffer manager and the amount of time the buffer manager needs to process incoming packets, it is desirable to keep the buffer manager's record keeping operations relatively simple.
A prior art "maximum packet size" buffer manager divides buffer memory into uniform sized packet buffers, each of which is large enough to handle the largest permissible packet size. Each packet buffer stores only one packet regardless of packet size. A maximum packet size buffer manager may employ relatively record keeping logic but does not make efficient use of buffer memory when most packets are much smaller than the largest possible size; much of the storage capacity of each packet buffer is often unused.
A "minimum packet size" buffer manager divides buffer memory into several uniform sized packet buffers, each of which is generally much smaller than the maximum allowable packet size, suitably only as large as the minimum allowable size packet. Since more than one packet buffer is usually needed to store a packet, the buffer manager splits an incoming packet into appropriately sized segments (i.e. it "disassembles" the packet) and stores the segments in as many available packet buffers as are needed. The buffer manager must maintain an ordered list of the packet buffers containing the segments of each packet so that it can properly reassemble the packet when it is time to forward it via an output bus. A minimum packet size buffer manager normally makes much more efficient use of buffer memory capacity than a maximum packet size buffer manager but is more complex because it has to carry out the disassembly and reassembly operations on each packet and because it must maintain a relatively more complicated record of packet storage locations. Also, since a minimum packet size buffer manager must carry out more complicated operations when receiving and forwarding a packet, a minimum packet size buffer manager may have a slower throughput than a network switch employing a maximum packet size buffer manager.
What is needed is a relatively simple buffer manager that provides for efficient use of buffer memory but which does not require substantial processing overhead.